import request from "@/utils/request";

// 列表
export function listSplashAd(query) {
  return request({
    url: "/mall/splashAd/list",
    method: "get",
    params: query,
  });
}

// 详情
export function getSplashAd(id) {
  return request({
    url: `/mall/splashAd/${id}`,
    method: "get",
  });
}

// 新增
export function addSplashAd(data) {
  return request({
    url: "/mall/splashAd",
    method: "post",
    data: data,
  });
}

// 修改
export function updateSplashAd(data) {
  return request({
    url: "/mall/splashAd",
    method: "put",
    data: data,
  });
}

// 删除
export function delSplashAd(id) {
  return request({
    url: `/mall/splashAd/${id}`,
    method: "delete",
  });
}

// 启用
export function enableSplashAd(ids) {
  return request({
    url: `/mall/splashAd/enable/${ids}`,
    method: "put",
  });
}

// 禁用
export function disableSplashAd(ids) {
  return request({
    url: `/mall/splashAd/disable/${ids}`,
    method: "put",
  });
}
